using System;
using System.Collections.Generic;
using System.Text;
using Decav.Reality;
using Decav.Data;

namespace Decav.Gatsb
{
    /// <summary>
    /// Defines a profile for a <see cref="User"/>, holding details about that person.
    /// </summary>
    [Serializable]
    public class UserProfile
    {
        protected UserProfile(DataRecordAdapter adapt)
        {
            if (adapt == null)
                throw new ArgumentNullException("adapt");

            _birthdayDate = adapt.GetDateTime("Birthday");
            _about = adapt.GetString("About");
            _gender = (Gender)adapt.GetInt32("Gender");
        }

        private string _about;
        private Gender _gender = Gender.Unknown;
        private DateTime _birthdayDate;

        /// <summary>
        /// Gets or sets text that describes the person biographically.
        /// </summary>
        public string About
        {
            get
            {
                return _about;
            }
            set
            {
                _about = value;
            }
        }

        /// <summary>
        /// Gets the date of the users birthday.
        /// </summary>
        public DateTime BirthdayDate
        {
            get
            {
                return _birthdayDate;
            }
            set
            {
                _birthdayDate = value;
            }
        }

        /// <summary>
        /// Gets or sets the users gender.
        /// </summary>
        public Gender Gender
        {
            get
            {
                return _gender;
            }
            set
            {
                _gender = value;
            }
        }
    }
}
